<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Application.View.KumomadoApplicationView');
	Kumomado::load('Kui.KumomadoUIClient');
	/**
	 * @package applications
	 * @subpackage member
	 * @author Tsai, Min Che
	 */
	class MemberUserView extends KumomadoApplicationView {
		public function userLogin() {
			$this->output('json');
		}
		public function userManage() {
			$frame = new KumomadoFrame();
			$window = new KumomadoWindow('TestWindow');
			$window->setTitle('Test KUI');
			$datagrid = new KumomadoDataGrid('test');
			$datagrid->setColumns(array('No', 'Id', 'Name', 'Options'));
			$datagrid->addRows(array(
				array('1', '0001', 'Test1', 'Edit'),
				array('2', '0002', 'Test2', 'Edit'),
				array('3', '0003', 'Test3', 'Edit'),
				array('4', '0004', 'Test4', 'Edit'),
				array('5', '0005', 'Test5', 'Edit'),
				array('6', '0006', 'Test6', 'Edit')
			));
			$datagrid2 = new KumomadoDataGrid('test2');
			$datagrid2->setColumns(array('No', 'Name', 'Options'));
			$datagrid2->addRows(array(
				array('1', 'Test1', 'Edit'),
				array('2', 'Test2', 'Edit'),
				array('3', 'Test3', 'Edit'),
				array('4', 'Test4', 'Edit'),
				array('5', 'Test5', 'Edit'),
				array('6', 'Test6', 'Edit')
			));
			$datagrid2->addRow(array('7'. 'Test7', 'Edit'), 2);
			$window->add($datagrid);
			$window->add($datagrid2);
			$window->setContent('test.xsl', KUMOMADO_APPLICATION_LAYOUTS_PATH);
			$window2 = new KumomadoWindow('TestWindow2');
			$window2->setTitle('Test two window');
			$window2->add($datagrid2);
			$window2->setContent('test.xsl', KUMOMADO_APPLICATION_LAYOUTS_PATH);
			$frame->add($window);
			$frame->add($window2);
			$this->response($frame->render());
			$this->output('json');
		}
	}
?>